// @ts-ignore
/* eslint-disable */
import { request } from 'umi';

/** 获取 线索报送  - 选题计划 提交 分页  POST */
export async function getCuesSubmitPage(options?: { [key: string]: any }) {
  return request<BaseResponseBean.responsePage<CuesSubmitData.SubmitPage[]>>('/cues/submit/page', {
    method: 'POST',
    data: options || {},
  });
}

/** 保存 线索报送  - 选题计划 提交  POST */
export async function saveCuesSubmit(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<string>>('/cues/submit/save', {
    method: 'POST',
    data: options || {},
  });
}

/** 获取 线索报送  - 选题计划 提交 详情  POST */
export async function getCuesSubmitDetails(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<CuesSubmitData.SubmitDetails>>('/cues/submit/details', {
    method: 'POST',
    data: options || {},
  });
}

/**获取 选题线索 报送线索 组织 列表 POST */
export async function searchTreeOrganization(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<CuesSubmitData.Organization[]>>(
    '/cues/submit/search/organization/tree',
    {
      method: 'POST',
      data: options || {},
    },
  );
}


/**获取 选题线索 报送线索 组织 列表 POST */
export async function submitAnalysis(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<CuesSubmitData.Organization[]>>(
    '/cues/submit/analysis',
    {
      method: 'POST',
      data: options || {},
    },
  );
}

/** 报送资源  获取回执详情  POST */
export async function receiptRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<Array<UserData.Organization>>>('/cues/submit/receipt/tree', {
    method: 'POST',
    data: options || {},
  });
}

/** 获取 线索报送  - 选题线索录用  POST */
export async function adoptRecord(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<CuesActiveData.ActiveDetails>>('/cues/adopt/save', {
    method: 'POST',
    data: options || {},
  });
}
/** 获取选题计划事件处理流程 */
export async function getTopicFlows(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<any[]>>(
    `/cues/topic/select/manage/flow?topicId=${options?.topicId}`,
    {
      method: 'GET',
      data: options || {},
    },
  );
}

/** 获取选题计划镇街，区县列表 */
export async function getTopicAreas(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<any[]>>(
    `/cues/topic/select/manage/tree?topicId=${options?.topicId}`,
    {
      method: 'GET',
      data: options || {},
    },
  );
}

/** 获取选题计划镇街，线索列表 */
export async function getTopicAreaCluesList(options?: { [key: string]: any }) {
  return request<BaseResponseBean.response<any[]>>(
    `/cues/topic/select/manage/town/street?eventNum=${options?.eventNum}`,
    {
      method: 'GET',
      data: options || {},
    },
  );
}
